-
Notifications
You must be signed in to change notification settings - Fork 16.1k
Move out some exceptions to TaskSDK #54505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
+570
−414
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ashb
reviewed
Aug 14, 2025
f4a380e to
7a4587c
Compare
fdff489 to
91d4cc0
Compare
kaxil
reviewed
Aug 19, 2025
airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py
Outdated
Show resolved
Hide resolved
kaxil
reviewed
Aug 19, 2025
airflow-core/src/airflow/api_fastapi/core_api/routes/public/extra_links.py
Outdated
Show resolved
Hide resolved
kaxil
reviewed
Aug 19, 2025
airflow-core/src/airflow/api_fastapi/core_api/routes/public/log.py
Outdated
Show resolved
Hide resolved
kaxil
reviewed
Aug 19, 2025
airflow-core/src/airflow/api_fastapi/execution_api/routes/connections.py
Outdated
Show resolved
Hide resolved
kaxil
reviewed
Aug 19, 2025
1 task
90180cf to
59d7f90
Compare
59d7f90 to
cf9fd0d
Compare
…flowException to RuntimeError
…usually caused by _AIRFLOW__AS_LIBRARY
befb137 to
8b77862
Compare
Contributor
|
🥳 |
62 tasks
Member
|
nice! |
This was referenced Nov 28, 2025
Copilot AI
pushed a commit
to jason810496/airflow
that referenced
this pull request
Dec 5, 2025
* Move out some exceptions to TaskSDK As part of the ongoing server/client separation, this commit moves out some exceptions to the Task sdk. The AirflowException usage in task sdk has been changed to RuntimeError. Also, the TaskNotFound exception is still duplicated due to the many usages in core API and SDK. Rename back RuntimeError to AirflowException expose TaskNotFound import from exceptions completely separate sdk imports fix conflicts Keep base AirflowException only in sdk import some exception from sdk into core exceptions add to be deprecated function to handle TaskNotFound and ParamValidationError catch some import error in airflow.exceptions and redefine the exceptions Core should not raise exceptions Move some exceptions to deprecated Raise RuntimeError instead of AirflowException in SDK Rename AirflowException in SDK to AirflowSDKException Update tests Remove AirflowNotFound in sdk exceptions Catch import errors for exceptions in example dags remove get_task redefine Import AirflowSensorTimeout properly and Remove airflowNotFoundException import from sdk Remove AirflowFailException in core Import AirflowException from core with a compat shim Fix import Use the sdk AirflowException in core and fix other exceptions raise ValueError in sparkhook * fixup! Move out some exceptions to TaskSDK * Fix provider RuntimeError change and fix for shared package modulenotfounderror * fixup! Fix provider RuntimeError change and fix for shared package modulenotfounderror * Fix sdk connection to catch RuntimeError instead of AirflowException * Use random str at task end to prevent duplicate task_id error so that the real error would raise * fixup! Use random str at task end to prevent duplicate task_id error so that the real error would raise * Use RuntimeError instead of AirflowNotFoundException for connections * fixup! fixup! Use RuntimeError instead of AirflowNotFoundException for connections * import tasktimeout properly * move TaskNotFound to sdk * Apply suggestion from @ephraimbuddy * Retain AirflowNotFoundException * AirflowException now inherits from RuntimeError, update provider changes * fixup! AirflowException now inherits from RuntimeError, update provider changes * Now that AirflowException inherits from Runtime, remove change of AirflowException to RuntimeError * Fix imports and exception use in providers * Explicitly cover for shared packages in exception * Fix ruff broadexception * fix mypy issue * remove unintended file addition * Remove left over cleanup * Return exception to AirflowException * Use import_string * Fix static checks * Revert subclassing AirflowException from Runtime * Fix providers importing deprecated exceptions to use compat SDK * fixup! Fix providers importing deprecated exceptions to use compat SDK * Use ModuleNotFoundError in exception if airflow.sdk is not installed(usually caused by _AIRFLOW__AS_LIBRARY * Fix Airflow 2 compat * Use ValueError instead of RuntimeError were appropriate * Update compat to have only the imports used in provider * Update example dag import and fix mypy error * fix conflict * Add news fragment item * fixup! Add news fragment item
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As part of the ongoing server/client separation,
this commit moves out some exceptions to the Task sdk.